/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ejb.persistencia;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author MoisesAntonio
 */
@Embeddable
public class BinjuegoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdBin")
    private int idBin;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IJuego")
    private int iJuego;

    public BinjuegoPK() {
    }

    public BinjuegoPK(int idBin, int iJuego) {
        this.idBin = idBin;
        this.iJuego = iJuego;
    }

    public int getIdBin() {
        return idBin;
    }

    public void setIdBin(int idBin) {
        this.idBin = idBin;
    }

    public int getIJuego() {
        return iJuego;
    }

    public void setIJuego(int iJuego) {
        this.iJuego = iJuego;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idBin;
        hash += (int) iJuego;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BinjuegoPK)) {
            return false;
        }
        BinjuegoPK other = (BinjuegoPK) object;
        if (this.idBin != other.idBin) {
            return false;
        }
        if (this.iJuego != other.iJuego) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.ejb.persistencia.BinjuegoPK[ idBin=" + idBin + ", iJuego=" + iJuego + " ]";
    }
    
}
